package ch7;

public class Thread1Test {

	public static void main(String[] args) {
		// 至少3个
		Thread1 t1 = new Thread1("线程1");
		// 调度
		Thread1 t2 = new Thread1("线程2");

		t1.start();

		t2.start();

		try {
			t1.join();
			t2.join();
		} catch (InterruptedException e) {
			// TODO 自动生成的 catch 块
			e.printStackTrace();
		}
		System.out.println("主线程" + Thread.currentThread().getName() + "结束");
	}

}
